home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14580 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 68 6f 73 74 2e 63 |Path: ne|wshost.c|
|00000010| 74 67 2e 63 6f 6d 21 6e | 65 77 73 61 64 6d 0a 46 |tg.com!n|ewsadm.F|
|00000020| 72 6f 6d 3a 20 22 53 2e | 20 46 2e 20 4c 6f 74 74 |rom: "S.| F. Lott|
|00000030| 22 20 3c 73 6c 6f 74 74 | 40 64 65 6c 70 68 69 2e |" <slott|@delphi.|
|00000040| 63 6f 6d 3e 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |com>.New|sgroups:|
|00000050| 20 63 6f 6d 70 2e 6c 61 | 6e 67 2e 63 0a 53 75 62 | comp.la|ng.c.Sub|
|00000060| 6a 65 63 74 3a 20 52 65 | 3a 20 48 6f 77 20 74 6f |ject: Re|: How to|
|00000070| 20 64 65 74 65 63 74 20 | 45 4f 46 3f 2f 66 69 6c | detect |EOF?/fil|
|00000080| 65 70 6f 69 6e 74 65 72 | 20 70 72 6f 62 6c 65 6d |epointer| problem|
|00000090| 2e 0a 44 61 74 65 3a 20 | 4d 6f 6e 2c 20 31 35 20 |..Date: |Mon, 15 |
|000000a0| 41 70 72 20 31 39 39 36 | 20 31 36 3a 31 35 3a 34 |Apr 1996| 16:15:4|
|000000b0| 30 20 2d 30 34 30 30 0a | 4f 72 67 61 6e 69 7a 61 |0 -0400.|Organiza|
|000000c0| 74 69 6f 6e 3a 20 43 54 | 47 0a 4d 65 73 73 61 67 |tion: CT|G.Messag|
|000000d0| 65 2d 49 44 3a 20 3c 33 | 31 37 32 41 45 36 43 2e |e-ID: <3|172AE6C.|
|000000e0| 32 41 46 39 40 64 65 6c | 70 68 69 2e 63 6f 6d 3e |2AF9@del|phi.com>|
|000000f0| 0a 52 65 66 65 72 65 6e | 63 65 73 3a 20 3c 33 31 |.Referen|ces: <31|
|00000100| 36 46 38 39 33 32 2e 32 | 42 41 46 40 77 77 77 2e |6F8932.2|BAF@www.|
|00000110| 70 61 72 74 69 6f 2e 66 | 69 3e 0a 52 65 70 6c 79 |partio.f|i>.Reply|
|00000120| 2d 54 6f 3a 20 73 6c 6f | 74 74 40 64 65 6c 70 68 |-To: slo|tt@delph|
|00000130| 69 2e 63 6f 6d 0a 4e 4e | 54 50 2d 50 6f 73 74 69 |i.com.NN|TP-Posti|
|00000140| 6e 67 2d 48 6f 73 74 3a | 20 74 73 5f 70 6f 72 74 |ng-Host:| ts_port|
|00000150| 32 31 2e 63 74 67 2e 63 | 6f 6d 0a 4d 69 6d 65 2d |21.ctg.c|om.Mime-|
|00000160| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 43 6f 6e |Version:| 1.0.Con|
|00000170| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|00000180| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|00000190| 73 2d 61 73 63 69 69 0a | 43 6f 6e 74 65 6e 74 2d |s-ascii.|Content-|
|000001a0| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|000001b0| 67 3a 20 37 62 69 74 0a | 58 2d 4d 61 69 6c 65 72 |g: 7bit.|X-Mailer|
|000001c0| 3a 20 4d 6f 7a 69 6c 6c | 61 20 32 2e 30 4a 61 76 |: Mozill|a 2.0Jav|
|000001d0| 61 42 31 20 28 4d 61 63 | 69 6e 74 6f 73 68 3b 20 |aB1 (Mac|intosh; |
|000001e0| 49 3b 20 50 50 43 29 0a | 54 6f 3a 20 22 52 2e 4b |I; PPC).|To: "R.K|
|000001f0| 2e 42 72 61 6e 64 22 20 | 3c 72 61 6c 70 68 40 77 |.Brand" |<ralph@w|
|00000200| 77 77 2e 70 61 72 74 69 | 6f 2e 66 69 3e 0a 0a 52 |ww.parti|o.fi>..R|
|00000210| 2e 4b 2e 42 72 61 6e 64 | 20 77 72 6f 74 65 3a 0a |.K.Brand| wrote:.|
|00000220| 3e 20 0a 3e 20 53 6f 72 | 72 79 20 74 6f 20 62 6f |> .> Sor|ry to bo|
|00000230| 74 68 65 72 20 79 6f 75 | 2c 20 62 75 74 20 49 20 |ther you|, but I |
|00000240| 68 61 76 65 20 61 20 70 | 72 6f 62 6c 65 6d 0a 3e |have a p|roblem.>|
|00000250| 20 77 68 69 6c 65 20 73 | 63 61 6e 6e 69 6e 67 20 | while s|canning |
|00000260| 74 68 72 6f 75 67 68 20 | 61 20 66 69 6c 65 20 74 |through |a file t|
|00000270| 6f 6f 20 73 65 65 20 77 | 68 65 74 68 65 72 0a 3e |oo see w|hether.>|
|00000280| 20 6f 72 20 6e 6f 74 20 | 61 20 63 65 72 74 61 69 | or not |a certai|
|00000290| 6e 20 77 6f 72 64 20 6f | 63 63 75 72 73 2e 0a 3e |n word o|ccurs..>|
|000002a0| 20 57 68 65 6e 20 49 20 | 72 75 6e 20 6f 75 74 20 | When I |run out |
|000002b0| 6f 66 20 66 69 6c 65 2c | 20 66 73 63 61 6e 66 28 |of file,| fscanf(|
|000002c0| 29 20 6b 65 65 70 73 0a | 3e 20 72 65 74 75 72 6e |) keeps.|> return|
|000002d0| 69 6e 67 20 74 68 65 20 | 6c 61 73 74 20 6c 69 6e |ing the |last lin|
|000002e0| 65 2c 20 69 6e 73 74 65 | 61 64 20 6f 66 20 73 6f |e, inste|ad of so|
|000002f0| 6d 65 20 4e 55 4c 4c 0a | 3e 20 76 61 6c 75 65 20 |me NULL.|> value |
|00000300| 49 20 77 6f 75 6c 64 20 | 66 69 6e 64 20 6c 6f 67 |I would |find log|
|00000310| 69 63 61 6c 20 28 62 75 | 74 20 77 68 6f 20 61 6d |ical (bu|t who am|
|00000320| 20 49 3f 29 2e 0a 0a 53 | 65 65 20 74 68 65 20 66 | I?)...S|ee the f|
|00000330| 65 6f 66 20 66 75 6e 63 | 74 69 6f 6e 20 69 6e 20 |eof func|tion in |
|00000340| 79 6f 75 72 20 68 61 6e | 64 79 20 6d 61 6e 75 61 |your han|dy manua|
|00000350| 6c 2e 0a 41 6c 73 6f 2c | 20 74 68 65 20 66 73 63 |l..Also,| the fsc|
|00000360| 61 6e 66 20 66 75 6e 63 | 74 69 6f 6e 20 72 65 74 |anf func|tion ret|
|00000370| 75 72 6e 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |urns the| number |
|00000380| 6f 66 0a 63 6f 6e 76 65 | 72 73 69 6f 6e 73 20 77 |of.conve|rsions w|
|00000390| 68 69 63 68 20 73 75 63 | 63 65 65 64 65 64 2e 20 |hich suc|ceeded. |
|000003a0| 20 49 66 20 79 6f 75 20 | 61 72 65 20 64 6f 69 6e | If you |are doin|
|000003b0| 67 0a 66 73 63 61 6e 66 | 28 22 25 73 22 29 20 63 |g.fscanf|("%s") c|
|000003c0| 68 61 6e 67 65 20 74 68 | 69 73 20 74 6f 0a 0a 77 |hange th|is to..w|
|000003d0| 6f 72 64 73 3d 20 66 73 | 63 61 6e 66 28 22 25 73 |ords= fs|canf("%s|
|000003e0| 22 2e 2e 2e 2e 29 0a 77 | 68 69 6c 65 28 20 77 6f |"....).w|hile( wo|
|000003f0| 72 64 73 20 29 20 7b 20 | 2e 2e 2e 3b 0a 09 77 6f |rds ) { |...;..wo|
|00000400| 72 64 73 3d 20 66 73 63 | 61 6e 66 28 22 25 73 22 |rds= fsc|anf("%s"|
|00000410| 2e 2e 2e 2e 29 0a 7d 0a | 0a 3e 20 0a 3e 20 48 6f |....).}.|.> .> Ho|
|00000420| 77 20 63 61 6e 20 49 20 | 74 65 73 74 20 66 6f 72 |w can I |test for|
|00000430| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00000440| 66 69 6c 65 3f 0a 3e 20 | 0a 3e 20 54 68 65 20 73 |file?.> |.> The s|
|00000450| 65 63 6f 6e 64 20 70 72 | 6f 62 6c 65 6d 20 69 73 |econd pr|oblem is|
|00000460| 20 68 6f 77 20 74 6f 20 | 6d 61 6e 69 70 75 6c 61 | how to |manipula|
|00000470| 74 65 20 61 0a 3e 20 70 | 6f 69 6e 74 65 72 20 6f |te a.> p|ointer o|
|00000480| 66 20 74 79 70 65 20 22 | 46 49 4c 45 22 2e 2e 73 |f type "|FILE"..s|
|00000490| 6f 2c 20 61 20 66 69 6c | 65 70 6f 69 6e 74 65 72 |o, a fil|epointer|
|000004a0| 2e 0a 3e 20 41 74 20 61 | 20 63 65 72 74 61 69 6e |..> At a| certain|
|000004b0| 20 70 6f 69 6e 74 20 49 | 20 77 61 6e 74 20 74 6f | point I| want to|
|000004c0| 20 73 6b 69 70 20 31 31 | 20 63 68 61 72 73 20 62 | skip 11| chars b|
|000004d0| 61 63 6b 0a 3e 20 69 6e | 20 74 68 65 20 66 69 6c |ack.> in| the fil|
|000004e0| 65 20 61 6e 64 20 73 74 | 61 72 74 20 77 72 69 74 |e and st|art writ|
|000004f0| 69 6e 67 2e 0a 3e 20 0a | 3e 20 73 74 72 69 6e 67 |ing..> .|> string|
|00000500| 2d 3d 31 31 3b 20 67 69 | 76 65 73 20 6d 65 20 61 |-=11; gi|ves me a|
|00000510| 6e 20 65 72 72 6f 72 20 | 61 6e 64 20 61 66 74 65 |n error |and afte|
|00000520| 72 0a 3e 20 73 74 72 69 | 6e 67 2d 2d 3b 20 66 70 |r.> stri|ng--; fp|
|00000530| 72 69 6e 74 66 28 73 74 | 72 69 6e 67 2c 22 66 6f |rintf(st|ring,"fo|
|00000540| 6f 22 29 3b 20 64 6f 65 | 73 20 6e 6f 74 20 64 6f |o"); doe|s not do|
|00000550| 0a 3e 20 61 6e 79 74 68 | 69 6e 67 20 61 6e 79 6d |.> anyth|ing anym|
|00000560| 6f 72 65 2e 0a 0a 52 65 | 70 6f 73 69 74 69 6f 6e |ore...Re|position|
|00000570| 20 79 6f 75 72 20 66 69 | 6c 65 20 77 69 74 68 20 | your fi|le with |
|00000580| 66 73 65 65 6b 2e 0a 66 | 73 65 65 6b 28 20 66 69 |fseek..f|seek( fi|
|00000590| 6c 65 2c 20 2d 31 31 2c | 20 53 45 45 4b 5f 43 55 |le, -11,| SEEK_CU|
|000005a0| 52 20 29 3b 0a 0a 3e 20 | 0a 3e 20 49 20 79 6f 75 |R );..> |.> I you|
|000005b0| 20 72 65 73 70 6f 6e 64 | 20 74 6f 20 74 68 69 73 | respond| to this|
|000005c0| 20 6f 6e 65 2c 20 70 6c | 65 61 73 65 20 64 6f 20 | one, pl|ease do |
|000005d0| 61 6c 73 6f 20 6d 61 69 | 6c 0a 3e 20 6d 65 20 61 |also mai|l.> me a|
|000005e0| 20 63 6f 70 79 2e 0a 3e | 20 0a 3e 20 54 68 61 6e | copy..>| .> Than|
|000005f0| 6b 73 2c 0a 3e 20 0a 3e | 20 20 20 20 20 20 20 20 |ks,.> .>| |
|00000600| 20 52 6f 65 6c 2e 0a 0a | 2d 2d 20 0a 53 2e 20 4c | Roel...|-- .S. L|
|00000610| 6f 74 74 0a 43 6f 6e 73 | 75 6c 74 61 6e 74 2c 20 |ott.Cons|ultant, |
|00000620| 4e 45 20 52 65 67 69 6f | 6e 0a 43 54 47 0a 53 4c |NE Regio|n.CTG.SL|
|00000630| 4f 54 54 40 44 45 4c 50 | 48 49 2e 43 4f 4d 0a 53 |OTT@DELP|HI.COM.S|
|00000640| 2e 4c 4f 54 54 40 43 54 | 47 2e 43 4f 4d 0a 38 30 |.LOTT@CT|G.COM.80|
|00000650| 30 2d 39 39 32 2d 35 33 | 35 30 20 62 6f 78 20 37 |0-992-53|50 box 7|
|00000660| 30 35 33 0a | |053. | |
+--------+-------------------------+-------------------------+--------+--------+